﻿@model List<YouWei.Infrastructure.Models.SmsStatisticsDto>
@{
   
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>数据运营统计-发送统计</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link href="@Url.Content("~/lib/bootstrap-datepicker/css/bootstrap-datepicker.min.css")" rel="stylesheet">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>


<div class="container">

    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#example-navbar-collapse">
                    <span class="sr-only">切换导航</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">数据运营统计</a>
            </div>
            <div class="collapse navbar-collapse" id="example-navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="@Url.Action("StatisticsDaySend")">进行中车型发送统计</a></li>
                    <li><a href="@Url.Action("StatisticsRemain")">进行中车型余量统计</a></li>
                    <li><a href="@Url.Action("StatisticsDaySendAll")">所有车型已发送统计</a></li>
                    <li><a href="@Url.Action("StatisticsAllRemain")">所有车型余量统计</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="panel-tool visible-xs">
        <button id="btnShowSearch" type="button" class="btn btn-default">选择日期</button>
        <label class="form-inline">日期：@ViewBag.StartTime - @ViewBag.EndTime</label>
    </div>
    
    <form id="formSearch" class="form-horizontal" role="form" method="GET" action="@Url.Action("StatisticsDaySend")">
        
        <div class="form-group">
            <label class="col-sm-2 control-label">开始日期(包含)</label>
            <div class="col-sm-10">
                <input class="form-control op-date input-sm-3" id="startTime" name="startTime" type="text" value="@ViewBag.StartTime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">结束日期(包含)</label>
            <div class="col-sm-10">
                <input class="form-control op-date" id="endTime" name="endTime" type="text" value="@ViewBag.EndTime">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">&nbsp;</label>
            <div class="col-sm-10">
                <button class="btn btn-primary" type="submit">查询</button>
            </div>
        </div>
    </form>
    <h4>发送统计</h4>
    <div class="table-responsive">
        <table class="table">

            <thead>
                <tr>
                    <th>品牌</th>
                    <th>车型</th>
                    <th>发送数量</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>@item.Col1</td>
                        <td>@item.Col2</td>
                        <td>@item.Col3</td>
                    </tr>
                }


            </tbody>
        </table>
    </div>

</div>

<style type="text/css">
    @@media (max-width: 768px) {
        #formSearch {
            display: none;
        }
        .datepicker {
            max-width: 100% !important;
            right: 0;
             }

            .datepicker .table-condensed {
                width: 100%;
                height: 100%;
            }
    }
     
</style>
    <script src="@Url.Content("~/lib/bootstrap-datepicker/js/bootstrap-datepicker.min.js")"></script>
    <script src="@Url.Content("~/lib/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js")"></script>
<script type="text/javascript">

    $(document).ready(function () {
        $(".op-date").datepicker({
            language: "zh-CN",
            autoclose: true,//选中之后自动隐藏日期选择框
            format: "yyyy-mm-dd"//日期格式，
            ,todayHighlight:true
            , calendarWeeks: false
            , todayBtn: true
            , clearBtn: true
            ,startDate:'2019-10-20'
        });
        $("#btnShowSearch").on("click", function () {

            var display = $("#formSearch").css("display");
            if (display == "none") {
                $("#formSearch").show();
            } else {
                $("#formSearch").hide();
            }

        });
    });
</script>
</body>
</html>